using System;
namespace ch.ethz.ssh2
{
	
	/// <summary> A <code>SFTPv3FileHandle</code>.
	/// 
	/// </summary>
	/// <author>  Christian Plattner
	/// </author>
	/// <version>  2.50, 03/15/10
	/// </version>
	
	public class SFTPv3FileHandle
	{
		/// <summary> Get the SFTPv3Client instance which created this handle. 
		/// 
		/// </summary>
		/// <returns> A SFTPv3Client instance.
		/// </returns>
		virtual public SFTPv3Client Client
		{
			get
			{
				return client;
			}
			
		}
		/// <summary> Check if this handle was closed with the {@link SFTPv3Client#closeFile(SFTPv3FileHandle)} method
		/// of the <code>SFTPv3Client</code> instance which created the handle.
		/// 
		/// </summary>
		/// <returns> if the handle is closed.
		/// </returns>
		virtual public bool Closed
		{
			get
			{
				return isClosed;
			}
			
		}
		//UPGRADE_NOTE: Final was removed from the declaration of 'client '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
		internal SFTPv3Client client;
		//UPGRADE_NOTE: Final was removed from the declaration of 'fileHandle '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
		internal byte[] fileHandle;
		internal bool isClosed = false;
		
		/* The constructor is NOT public */
		
		internal SFTPv3FileHandle(SFTPv3Client client, byte[] h)
		{
			this.client = client;
			this.fileHandle = h;
		}
	}
}